<?php
namespace app\admin\validate;

use think\Validate;
// session_start();
class Admin1 extends Validate
{
    protected $rule = [
        //表单名,表单里面的字段名
        'account'  =>  'require|unique:admin,account',
        'password'  =>'require|min:6',
        'head_img' => 'require',
    ];
    protected $message  =   [
        'account.require'  => '账户必须填写', 
        'account.unique'  => '账户已存在', 
        'password.require' => '密码必须填写',
        'head_img.require' => '头像必须上传',
    ];

}